<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8"/>
    <title>工装维修管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link rel="icon" type="image/x-icon" href="/favicon.ico" th:href="@{/favicon.ico}" >
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>


</head>
<body>
<!--头部-->
<header th:replace="common/head">
</header>
<!-- 页面指向 -->
<div class="page-point bg-white">
    <ul>
        <li>首页</li>
        <li>工装管理</li>
        <li>工装维修管理</li>
    </ul>
</div>
<!-- 菜单树 -->
<div th:replace="common/left">
</div>
<!--主体内容-->
<div class="page-container">

    <div class="container-fluid mb-20 clearfix">
        <div class="col-md-12">
            <h2 class="page-section-title">查询条件</h2>
        </div>
    </div>

    <div class="container-fluid query-frame-wrap mb-10 clearfix">
        <div class="col-lg-9 col-lg-item-6">
            <div class="row">
                <div class="col-lg-4">
                    <div class="query-frame">
                        <label>工装编号</label>
                        <select class="form-control tool-code-select2 tool-repair-search" id="toolCode">
                        </select>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="query-frame">
                        <label>工装名称</label>
                        <input autocomplete="new-password" class="form-control tool-repair-search" type="text" id="toolName"/>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="query-frame">
                        <label>工装类别</label>
                        <select id="toolType"  class="form-control tool-repair-search tool-type" >
                        </select>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-4">
                    <div class="query-frame">
                        <label>工装型号</label>
                        <input autocomplete="new-password" id="toolModel"  type="text" class="form-control tool-repair-search" />
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="query-frame">
                        <label>所属设备</label>
                        <select class="form-control equip-code-select2 tool-repair-search" id="equipCode">
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-lg-3">
            <div class="query-frame query-button">
                <img id="queryToolRepair" th:src="@{/image/search.png}" src="../../static/image/search.png" />
                <img class="reset" th:src="@{/image/rest.png}" src="../../static/image/rest.png" />
            </div>
        </div>

    </div>

    <div class="container-fluid mb-20 clearfix">
        <div class="col-md-12 rlt">
            <h2 class="page-section-title tab-table-btn">
                <span class="active" data-tableid="toolRepairInFactoryTable">厂内维修列表</span>
                <span data-tableid="toolRepairDelegationTable">委外列表</span>
                <span data-tableid="toolRepairedTable">已维修列表</span>
                <span data-tableid="toolScrapTable">已报废列表</span>
            </h2>
            <div class="table-tool-box">
                <ul class="table-tool active">
                    <li id="repairInFactory">
                        <span class="icon-list_weixiuchuli" aria-hidden="true"></span>
                        <label>维修</label>
                    </li>
                    <li class="scrap" id="scrap1">
                        <span class="icon-list_querenbaofei" aria-hidden="true"></span>
                        <label>报废</label>
                    </li>
                    <li id="refresh1">
                        <span class="icon-list_shuaxin" aria-hidden="true"></span>
                        <label>刷新</label>
                    </li>
                </ul>
                <ul class="table-tool">
                    <li id="repairDelegation">
                        <span class="icon-list_weixiuchuli" aria-hidden="true"></span>
                        <label>送修</label>
                    </li>
                    <li id="back">
                        <span class="icon-list_xiugai" aria-hidden="true"></span>
                        <label>返厂</label>
                    </li>
                    <li class="scrap" id="scrap2">
                        <span class="icon-list_querenbaofei" aria-hidden="true"></span>
                        <label>报废</label>
                    </li>
                    <li id="refresh2">
                        <span class="icon-list_shuaxin" aria-hidden="true"></span>
                        <label>刷新</label>
                    </li>
                </ul>
                <ul class="table-tool">
                    <li id="scrap3">
                        <span class="icon-list_querenbaofei" aria-hidden="true"></span>
                        <label>报废</label>
                    </li>
                </ul>
                <ul class="table-tool">
                    <li>
                    </li>
                </ul>
            </div>
        </div>
    </div>

    <div class="container-fluid table-container">
        <!--厂内维修-->
        <div class="table-item active">
            <table id="toolRepairInFactoryTable" cellspacing="" cellpadding="">
            </table>
        </div>
        <!--委外维修-->
        <div class="table-item">
            <table id="toolRepairDelegationTable" cellspacing="" cellpadding="">
            </table>
        </div>
        <!--已维修-->
        <div class="table-item">
            <table id="toolRepairedTable" cellspacing="" cellpadding="">
            </table>
        </div>
        <!--已报废-->
        <div class="table-item">
            <table id="toolScrapTable" cellspacing="" cellpadding="">
            </table>
        </div>
    </div>
</div>

<div th:replace="common/foot" >
</div>

<!--新增-->
<form id="toolRepairInFactoryForm"  class="form-horizontal tool-repair-factory-form" action="">
    <div class="modal fade" id="repairInFactoryModal" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">维修过程</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="form-group">
                            <label class="col-lg-4 control-label form-required form-required-6">维修开始时间</label>
                            <div class="col-lg-7 date-frame">
                                <input autocomplete="new-password" class="form-control form-datetime" name="repairDateStart"  type="text" readonly/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label form-required form-required-6">维修结束时间</label>
                            <div class="col-lg-7 date-frame">
                                <input autocomplete="new-password" class="form-control form-datetime" name="repairDateEnd"  type="text" readonly/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label form-required form-required-3">维修人</label>
                            <div class="col-lg-7">
                                <select name="repairUser" class="form-control sys-user-select2" id="repairUser">
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label ">维修说明</label>
                            <div class="col-lg-7">
                                <input autocomplete="new-password" class="form-control" type="text" name="remark" />
                            </div>
                        </div>
                        <input autocomplete="new-password" type="hidden" name="pkId" value=""/>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary yes">保存</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>
</form>

<form id="toolRepairDelegationForm"  class="form-horizontal tool-repair-delegation-form" action="">
    <div class="modal fade" id="repairDelegationModal" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">维修过程</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="form-group">
                            <label class="col-lg-4 control-label form-required form-required-3">送修人</label>
                            <div class="col-lg-7">
                                <select name="sendRepairUser" class="form-control sys-user-select2" id="sendRepairUser">
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label form-required form-required-4">送修时间</label>
                            <div class="col-lg-7 date-frame">
                                <input autocomplete="new-password" class="form-control form-datetime" name="sendRepairDate"  type="text" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label ">维修公司</label>
                            <div class="col-lg-7">
                                <input autocomplete="new-password" class="form-control" name="sendRepairCompany"  type="text" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label ">联系人</label>
                            <div class="col-lg-7">
                                <input autocomplete="new-password" class="form-control" name="contact"  type="text" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label ">联系方式</label>
                            <div class="col-lg-7">
                                <input autocomplete="new-password" class="form-control" name="contactNumber"  type="text" />
                            </div>
                        </div>
                        <input autocomplete="new-password" type="hidden" name="pkId" value=""/>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary yes">保存</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>
</form>

<script type="text/javascript">
    (function(){
        var $btn = $('.tab-table-btn').find('span');
        var $toolBox = $('.table-tool-box').find('.table-tool');
        var $tableContainer = $('.table-container').find('.table-item');

        $btn.click(function() {
            var index = $(this).index();

            $btn.removeClass('active');
            $(this).addClass('active');

            $toolBox.removeClass('active');
            $tableContainer.removeClass('active');

            $toolBox.eq(index).addClass('active');
            $tableContainer.eq(index).addClass('active');
            var tableId = $(this).data("tableid");
            //console.log(tableId);
            if(tableId&&tableId!=='') {
                $('#'+tableId).bootstrapTable('refreshOptions', {
                    pageNumber: 1
                });
            }
        })
    })();
</script>

<script th:src="@{/js/tool/toolRepairInFactory.js}" ></script>
<script th:src="@{/js/tool/toolRepairDelegation.js}" ></script>
<script th:src="@{/js/tool/toolRepaired.js}" ></script>
<script th:src="@{/js/tool/toolScrap.js}" ></script>
<script th:src="@{/js/tool/toolRepair.js}" ></script>

</body>
</html>